package com.yc.dygang.web;

import com.google.gson.Gson;
import com.yc.dygang.dao.SearchDao;
import com.yc.dygang.util.Util;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;
import java.util.Map;

@WebServlet(name = "Get2SearchServlet", value = "/Get2SearchServlet")
public class Get2SearchServlet extends HttpServlet {

    private SearchDao searchDao = new SearchDao();

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        List<Map<String, Object>> list = searchDao.querySearchs();
        Util.toJson(list,response);
    }

}
